package com.litblue.artwork.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.litblue.artwork.service.ArtworkService;
import com.litblue.starter.pojo.artwork.query.LitArtworkInfoQuery;
import com.litblue.starter.pojo.artwork.vo.LitArtworkInfoVo;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("art")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class ArtController {

    private final ArtworkService artworkService;
    @RequestMapping("test")
    public String getTestContent(){
        return "hello";
    }

    @GetMapping("/workInfo/queryAllArtWorkData")
    public IPage<LitArtworkInfoVo> queryAllArtWorkData(LitArtworkInfoQuery litArtworkInfoQuery){
       return artworkService.queryAllArtWorkData(litArtworkInfoQuery);
    }
}
